//
//  Functions.swift
//  MyLocations
//
//  Created by JokerAtBaoFeng on 16/3/17.
//  Copyright © 2016年 baofeng. All rights reserved.
//

import Foundation
import Dispatch

func afterDelay(second: Double, closure: () -> ()) {
    let when = dispatch_time(DISPATCH_TIME_NOW, Int64(second * Double(NSEC_PER_SEC)))
    
    dispatch_after(when, dispatch_get_main_queue(),closure)
}

let applicationDocumentsDirectory: NSString = {
    let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory,.UserDomainMask,true) as [String]
    return paths[0]
}()
